package com.woniu.project.client;

import com.woniu.project.core.dto.ResultDto;
import com.woniu.project.params.productsmalltype.ProdcutSmallTypeAddParam;
import com.woniu.project.params.productsmalltype.ProdcutSmallTypeSelectParam;
import com.woniu.project.params.productsmalltype.ProdcutSmallTypeUpdateParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

@FeignClient(name = "product-server")
public interface ProductSmallTypeClient {
    @GetMapping("/pawn/product/productSmallType/select")
    public ResultDto select(@Valid @RequestBody ProdcutSmallTypeSelectParam prodcutSmallTypeSelectParam) ;
    //新增商品小类
    @PostMapping("/pawn/product/productSmallType/addSmallType")
    public ResultDto addSmallType(@Valid @RequestBody ProdcutSmallTypeAddParam prodcutSmallTypeAddParam);

    //修改商品小类
    @PutMapping("/pawn/product/productSmallType/updateSmallType")
    public ResultDto updateSmallType(@Valid @RequestBody ProdcutSmallTypeUpdateParam prodcutSmallTypeUpdateParam);

    //根据id删除小类
    @DeleteMapping("/pawn/product/productSmallType/deleteById/{id}")
    public ResultDto deleteById(@PathVariable Integer id);
}
